<!--
 * @Author: yan_hai_dong 891236760@qq.com
 * @Date: 2022-10-24 13:30:20
 * @LastEditors: yan_hai_dong 891236760@qq.com
 * @LastEditTime: 2022-10-24 16:11:36
 * @FilePath: \app\src\views\canvas\circle\ratio\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <canvas height="400" width="400"></canvas>
</template>

<script>
import Ratio from "./js/index.js";
export default {
  mounted() {
    let data = [
      {
        text: "项目一占比",
        rate: 100,
        color: "#ff8800",
      },
      {
        text: "项目二占比",
        rate: 30,
        color: "green",
      },
      {
        text: "项目3占比",
        rate: 50,
        color: "red",
      },
    ];
    new Ratio(this.$el).init(data);
  },
};
</script>

<style lang="less" scoped>
</style>